from time import sleep
import uiautomation
import pyautogui
class hulijibie():
        his = uiautomation.WindowControl(searchDepth=1, Name='科玛奇医院信息管理系统')  # 锁定窗口
        his.SetFocus()
        hulijiluchuangkou = his.WindowControl(Name='护理记录')
        biangenghoudehullijibie =hulijiluchuangkou.EditControl(AutomationId='PART_TextBox',ClassName='TextBox')
        baocun = his.ButtonControl(AutomationId='btn_save',ClassName='Button',Name='保  存')
        def refind(self):
                self.hulijiluchuangkou.Refind()
                self.biangenghoudehullijibie.Refind()
                self.baocun.Refind()
        #输入护理级别
        def input_hljb(self,hljb):
                self.refind()
                self.biangenghoudehullijibie.Click()
                self.biangenghoudehullijibie.SendKeys(hljb)
                sleep(1)
                pyautogui.press('enter')
        #点击保存
        def click_bc_btn(self):
                self.refind()
                self.baocun.Click()





